//
//  AllConstants.h
//  QRMaster
//
//  Created by myApple on 15/12/21.
//  Copyright (c) 2015年 myApple. All rights reserved.
//

#import <Foundation/Foundation.h>

#pragma mark ------------------------home路径
#define DB_PATH [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/qr_db.db"]
#define HomePathArray  NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);


#pragma mark ------------------------NSUserDefaults文件
#define UID [[NSUserDefaults standardUserDefaults] objectForKey:@"uid"]
#define TOKEN [[NSUserDefaults standardUserDefaults]objectForKey:@"token"]
#define AREACODE [[NSUserDefaults standardUserDefaults]objectForKey:@"areaCode"]
#define FirstLaunch [[NSUserDefaults standardUserDefaults]boolForKey:@"firstLaunch"]
#define BeforeVersion [[NSUserDefaults standardUserDefaults]objectForKey:@"beforeVersion"]

#pragma mark ------------------------通用的坐标
#define UI_NAVIGATION_BAR_HEIGHT        44
#define UI_TAB_BAR_HEIGHT               49
#define UI_STATUS_BAR_HEIGHT            20
#define UI_SCREEN_WIDTH                 ([[UIScreen mainScreen] bounds].size.width)
#define UI_SCREEN_HEIGHT                ([[UIScreen mainScreen] bounds].size.height)
#define UI_MAINUI_SCREEN_HEIGHT            (UI_SCREEN_HEIGHT - UI_STATUS_BAR_HEIGHT)
#define UI_MAINUI_SCREEN_HEIGHT_ROTATE     (UI_SCREEN_WIDTH - UI_STATUS_BAR_HEIGHT)
//算 宽加X坐标的和
#define width_x(view)  view.frame.size.width + view.frame.origin.x
//算 高加Y坐标的和
#define height_y(view)  view.frame.size.height + view.frame.origin.y


#pragma mark -----------------------设备系统，设备型号，软件版本
#define iOSSystem [[[UIDevice currentDevice] systemVersion] floatValue]

#define iPhone6P ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1242, 2208), [[UIScreen mainScreen] currentMode].size) : NO)
#define iPhone6 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(750, 1334), [[UIScreen mainScreen] currentMode].size) : NO)
#define iPhone5 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 1136), [[UIScreen mainScreen] currentMode].size) : NO)
#define iPhone4 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 960), [[UIScreen mainScreen] currentMode].size) : NO)

#define SoftwareVersion [[[NSBundle mainBundle]infoDictionary]objectForKey:@"CFBundleShortVersionString"]


#pragma mark ----------------------一些key值

#define ShareSDKSecretKey @"b60180fc04e4"
#define ShareQZoneIDKey @"1104564391"
#define ShareWeChatIDKey @"wx1354438a206d5aa6"
#define ShareWeChatSecretKey @"d4624c36b6795d1d99dcf0547af5443d"
#define publicKeyString @"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxMmFHJs9+FRp28nlaBTw\
FUtOqw5jlzgbHKB65Db875/xa2Ruv5TXBlt6694tmUFISun53e3vYBuEpgj3IDuw\
Wcc0j8u1kv89ffIx3x2GOJCM54LqOh8dB+85xusBo2UojfRN0x48KeG6xDEhfw3h\
18nBHHRhPirXh0wgnF5FJejuvbbjMUiuXR1zyHvZ2IGT4QROin9MELXUcf8ViwES\
ZP8qJm67F8gLoppZj3sPfeYeagq5t8qmDqv/Gr7xe82eJ6mzZMYn7IPiK7TOCZTU\
D5rWDWBZHi66aDi/P6NxpSQMggjSBp4bDLeHeMMwf8jq7/4Lc3nL3NbZXooMEnvi\
GwIDAQAB"

#define COMMUNITYINFOFORKEY @"community" //plist 文件字典的键值
#define STAFFINFO   @"staffinfo" //同上
#define HOUSEINFO   @"houseinfo"//同上
#define FAVERITCARD  @"newFaveritCard"//同上
#define HEADERIMG  @"headerimg"//同上，存图片
#define GUESTUREKEY @""//存储手势密码的key

#pragma mark ----------------------通知的名称

#define NetWorkBreak             @"NetworkBreak"
#define NetWorkJion              @"NetworkJion"
#define CancleStaffDelete        @"CanCleStaffDelete"
#define DeleteStaff              @"deleteCell"
#define SearchStaffContent       @"searchStaffContent"
#define CancleStaffSearch        @"cancelStaffSearch"
#define GetStaffDataByCommunity  @"GetStaffDataByCommunity"
#define ChangeHeight             @"height"
#define StaffInfo                @"staffInfo"
#define ChangeLanguage           @"changeLanguage"
#define GetGuestDataByCommuntiy  @"GetGuestDataByCommunity"
#define CanCleGuestDelete        @"CanCleGuestDelete"
#define KCHiddenKeyBoardNotification @"KCHiddenKeyBoardNotification"
#define SearchGuestContent       @"searchGuestContent"
#define CancelGuestSearch        @"CancelGuestSearch"
#define GetGuestDataByRoom       @"GetNewGuestData"
#define DeleteGuestCell          @"deleteGuestCell"
#define FailGuestData            @"failGuestData"


#define AreaArray  @[NSLocalizedString(@"Australia", nil),NSLocalizedString(@"Bulgaria", nil),NSLocalizedString(@"Brazil", nil),NSLocalizedString(@"Dubai", nil),NSLocalizedString(@"Germany", nil),NSLocalizedString(@"Russia", nil),NSLocalizedString(@"France", nil),NSLocalizedString(@"Philippines", nil),NSLocalizedString(@"Korea", nil),NSLocalizedString(@"Netherlands", nil),NSLocalizedString(@"Czech", nil),NSLocalizedString(@"Canada", nil),NSLocalizedString(@"Romania", nil),NSLocalizedString(@"United States", nil),NSLocalizedString(@"Malaysia", nil),NSLocalizedString(@"Mexico", nil),NSLocalizedString(@"Portugal", nil),NSLocalizedString(@"Saudi Arabia", nil),NSLocalizedString(@"Turkey", nil),NSLocalizedString(@"Thailand", nil),NSLocalizedString(@"China-Taiwan", nil),NSLocalizedString(@"Spain", nil),NSLocalizedString(@"China-Hong Kong", nil),NSLocalizedString(@"Singapore", nil),NSLocalizedString(@"Greece", nil),NSLocalizedString(@"New Zealand", nil),NSLocalizedString(@"Hungary", nil),NSLocalizedString(@"India", nil),NSLocalizedString(@"Italy", nil),NSLocalizedString(@"United Kingdom", nil),NSLocalizedString(@"Iran", nil),NSLocalizedString(@"Israel", nil),NSLocalizedString(@"China", nil),NSLocalizedString(@"Chile", nil),NSLocalizedString(@"Indonesia", nil)]

#define  AreaCodeArray @[@"61",@"359",@"55",@"9714",@"49",@"7",@"33",@"63",@"82",@"31",@"420",@"1",@"40",@"1",@"60",@"52",@"351",@"966",@"90",@"66",@"886",@"34",@"852",@"65",@"30",@"64",@"36",@"91",@"39",@"44",@"98",@"972",@"86",@"56",@"62"]



/**
 *  tabbar 的按钮个数
 */
#define TABBARCOUNT 5

/**
 *  返回错误的解析
 */
#define ERRORINFO @"com.alamofire.serialization.response.error.data"

#ifndef QRMaster_AllConstants_h
#define QRMaster_AllConstants_h




#endif
